home *** CD-ROM | disk | FTP | other *** search
- property pSpr, pText, pLastLine, pHilightArrow, pSolidArrow, pLineHeight
-
- on beginSprite me
- global gUserTips
- pSpr = sprite(me.spriteNum)
- pSolidArrow = sprite(me.spriteNum + 1)
- pHilightArrow = sprite(me.spriteNum + 2)
- temp = EMPTY
- repeat with X = 1 to count(gUserTips)
- temp = temp & gUserTips[X][#tipName] & RETURN
- end repeat
- delete char -30000 of temp
- customFont(pSpr.member)
- if isText(pSpr) then
- pSpr.member.text = temp
- pText = pSpr.member.text
- pLineHeight = charPosToLoc(pSpr.member, 1).locV + 1
- mouseLeave(me)
- end if
- end
-
- on mouseLeave me
- if isText(pSpr) then
- pLastLine = VOID
- pSpr.member.color = black()
- pHilightArrow.locV = -50
- end if
- end
-
- on mouseWithin me
- if paused() then
- exit
- end if
- thisLine = PointToLine(pSpr, the mouseLoc)
- if thisLine = pLastLine then
- exit
- end if
- if thisLine > 0 then
- if not voidp(pLastLine) then
- pSpr.member.line[pLastLine].color = black()
- end if
- pLastLine = thisLine
- pSpr.member.line[thisLine].color = red()
- pHilightArrow.locV = currentLineLoc(me, thisLine)
- end if
- end
-
- on mouseDown me
- if paused() then
- exit
- end if
- if voidp(pLastLine) then
- pLastLine = PointToLine(pSpr, the mouseLoc)
- end if
- if not voidp(pLastLine) then
- if customHelpTopic(pLastLine, 1) then
- pSolidArrow.locV = currentLineLoc(me, pLastLine)
- end if
- end if
- end
-
- on currentLineLoc me, thisLine
- pSpr = sprite(me.spriteNum)
- pLineHeight = charPosToLoc(pSpr.member, 1).locV + 1
- return pSpr.locV + ((thisLine - 1) * pLineHeight)
- end
-